# -*- coding: utf-8 -*-
__author__ = 'alindar'
__date__ = '2018/7/13/013 15:51'
from django import forms
from captcha.fields import CaptchaField


class LoginForms(forms.Form):
    username = forms.CharField(required=True)
    password = forms.CharField(required=True, min_length=6, max_length=10)


class RegisterForms(forms.Form):
    username = forms.CharField(required=True, min_length=4, max_length=10)
    password = forms.CharField(required=True, min_length=6, max_length=10)
    email = forms.EmailField(required=True)
    captcha = CaptchaField(error_messages={"invalid": u"验证码输入错误"})
